import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home.vue'
import Category from '@/views/category.vue'
import Search from '@/views/search.vue'
import Searchlist from '@/views/searchlist.vue'
import prodetail from '@/views/prodetail.vue'
import Login from '@/views/login.vue'

Vue.use(Router)

export default new Router({
    routes: [{
            name: 'default',
            path: '/',
            redirect: { name: 'Home' }
        },
        {
            name: 'Home',
            path: '/home',
            component: Home
        },
        {
            name: 'Category',
            path: '/category',
            component: Category
        },
        {
            name: 'Search',
            path: '/search',
            component: Search
        },
        {
            name: 'Searchlist',
            path: '/searchlist/:key',
            component: Searchlist
        },
        {
            name: 'prodetail',
            path: '/prodetail/:id',
            component: prodetail
        },
        {
            name: 'Login',
            path: '/login',
            component: Login
        },
    ],
    linkActiveClass: 'isActive'
})